import React from "react";

import { Switch, Route, } from "react-router-dom";

// 购物车
import { Seckill_list } from "../components/seckill/seckill_list";
import { Seckill_addpage } from "../views/seckill/add_page"
import { Seckill_res } from "../components/seckill/seckill_res"
// import Students from "../component/Fncstudents/studentsList"
// import Addstu from "../component/Fncstudents/addStudents"
// import ReviseStudent from "../component/Fncstudents/reviseStudent"
// import StudentPhoto from "../component/Fncstudents/studentPhoto"
import Commodity from "../components/commodity/commodity";
import AddCommodity from "../components/commodity/addCommodity";
import EditCommodity from "../components/commodity/editCommodity";
import UploadImgs from "../components/commodity/uploadImgs";

import ShoppingCart from "../components/shoppingCart";
import ShoppingCartAdd from "../components/shoppingCart/add"
// 订单
import Order from "../components/order";
import OrderAdd from "../components/order/add";

//类型
import ToltalTye from "../components/totalType/index.js"
import ChildTotalType from "../components/totalType/childType";

//引入用户组件
import UsersAdd from "../components/users/add.js"
import { UsersList } from "../components/users/index"

//自提点
import Address from "../components/address/address.js"
import AddAddress from "../components/address/addAddress";
import AmendAdress from "../components/address/amendAdress.js";
import UploadAdress from "../components/address/uploadAdress";
// eslint-disable-next-line
export default () => {
  return (
    <div style={{ marginLeft: "20px" }}>
      <Switch>
        {/* 秒杀 */}
        <Route path="/info/seckill_list">
          <Seckill_list />
        </Route>
        {/* 秒杀-新增 */}
        <Route path="/info/seckill_add">
          <Seckill_addpage />
        </Route>
        {/* 秒杀-修改 */}
        <Route path="/info/seckill_res">
          <Seckill_res />
        </Route>
        {/* 购物车 */}
        <Route path="/info/shoppingCart">
          <ShoppingCart />
        </Route>
        <Route path="/info/shoppingCart-add/:_id">
          <ShoppingCartAdd />
        </Route>
        <Route path="/info/order">
          <Order />
        </Route>
        <Route path="/info/order-add">
          <OrderAdd />
        </Route>
        {/* 订单 */}
        <Route path="/info/order">
          <Order />
        </Route>
        {/* 种类-大类 */}
        <Route path="/info/totaltype">
          <ToltalTye />
        </Route>
        {/* 子类 */}
        <Route path="/info/childType">
          <ChildTotalType />
        </Route>
        {/* 新增用户 */}
      <Route path="/info/UsersAdd">
        <UsersAdd />
      </Route>
      {/* 用户列表 */}
      <Route path="/info/UsersSet">
        <UsersList />
      </Route>
      {/* 商品 */}
      <Route path="/info/commodity">
        <Commodity />
      </Route>
      {/* 新增商品 */}
      <Route path="/info/addcommodity">
        <AddCommodity />
      </Route>
      {/* 修改商品 */}
      <Route path="/info/editcommodity">
        <EditCommodity />
      </Route>
      <Route path="/info/uploadImgs">
        <UploadImgs />
      </Route>
      {/* 自提点列表 */}
      <Route path="/info/address">
        <Address />
      </Route>
      {/* 新增自提点 */}
      <Route path="/info/addAddress">
        <AddAddress />
      </Route>
      {/* 修改自提点amendAdress */}
      {/* 新增自提点 */}
      <Route path="/info/amendAdress">
        <AmendAdress />
      </Route>
      {/* 上传自提点图片 */}
      <Route path="/info/UploadAdress">
        <UploadAdress />
      </Route>
    </Switch>
    </div >
  );
}


